<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                    },
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-4">
    <div class="bg-white rounded-xl shadow-sm p-8 max-w-md w-full">
        <div class="text-center mb-8">
            <div class="w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
                <i class="fa fa-lock text-primary text-2xl"></i>
            </div>
            <h1 class="text-2xl font-bold">用户登录</h1>
        </div>
        
        <form id="loginForm">
            <div class="mb-6">
                <label for="username" class="block text-sm font-medium text-gray-700 mb-1">用户名</label>
                <input type="text" id="username" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all duration-200" placeholder="请输入用户名">
            </div>
            
            <div class="mb-6">
                <label for="password" class="block text-sm font-medium text-gray-700 mb-1">密码</label>
                <input type="password" id="password" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all duration-200" placeholder="请输入密码">
            </div>
            
            <button type="submit" class="w-full px-6 py-3 rounded-lg bg-primary text-white hover:bg-primary/90 transition-all duration-200 flex items-center justify-center">
                <i class="fa fa-sign-in mr-2"></i> 登录
            </button>
        </form>
        
        <div class="mt-6 text-center text-gray-500 text-sm">
            <p>密码为：<span class="font-medium">1234</span></p>
        </div>
    </div>

    <script>
        document.getElementById('loginForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const password = document.getElementById('password').value;
            
            if (password === '1234') {
                // 密码正确，跳转到欢迎页面
                window.location.href = 'hello.html';
            } else {
                // 密码错误，显示提示
                alert('密码错误，请重试！');
            }
        });
    </script>
</body>
</html>
    
